extends ../layout

block main
	ul.breadcrumb
		li
			i.icon-home
		li
			i.icon-angle-right
		li
			a(href="/") 面板


	div(class="row-fluid sortable")
		div(class="box span12")
			div(class="box-header", data-original-title)
				h2
					i(class="halflings-icon user")
					span.break
					| 退款

			div.box-content			
				table(class="table table-striped table-bordered bootstrap-datatable datatable")
					thead
						tr
							th 时间
							th 单号
							th 用户
							th 支付单
							th 已退
							th 状态
							th 失败原因
					tbody
						- var states = ['初始', '成功', '未成功']
						- each refund in refunds
							tr
								td= moment(refund.updatedAt).format('LLL')
								td
									a(href="/refunds/#{refund.id}", target="_blank") #{refund.id}
								td
									a(href="/customers/#{refund.get('customer_id')}", target="_blank") #{refund.get('customer_id')}
								td
									a(href="/payments/#{refund.get('payment_id')}", target="_blank") #{refund.get('payment_id')}
								td= refund.get('money')
								td= states[refund.get('state')]
								td= refund.get('reason')